package com.offline.module.goods.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.offdissys.common.db.entity.BaseEntity;
import lombok.Data;

import javax.persistence.Column;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author ZhangHaiWen
 * @title: GoodsInfo
 * @projectName mybatisplustest
 * @description: 商品信息表
 * @date 2021/12/1315:25
 */
@Data
@TableName(value = "goods_info")
public class GoodsInfo extends BaseEntity implements Serializable {
    /**
     * 商品id
     */
    @Column(name = "goods_id")
    @TableId(value = "goods_id" ,type = IdType.AUTO)
    private Integer goodsId;

    /**
     * 商品名称
     */
    @Column(name = "goods_name")
    @TableField(value = "goods_name")
    private String goodsName;

    /**
     * 商品数量
     */
    @Column(name = "goods_num")
    @TableField(value = "goods_num")
    private Integer goodsNum;

    /**
     * 添加时间
     */
    @Column(name = "add_time")
    @TableField(value = "add_time")
    private Date addTime;

    /**
     * 商品金额
     */
    @Column(name = "goods_amount")
    @TableField(value = "goods_amount")
    private BigDecimal goodsAmount;


    /**
     * 已售数量
     */
    @Column(name = "sale_num")
    @TableField(value = "sale_num")
    private Integer saleNum;
}
